package com.example.remoteaction.extension.demo.domain;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Version;

import net.sf.gilead.pojo.gwt.LightEntity;


@Entity
public class School extends LightEntity implements java.io.Serializable{

	@GeneratedValue
	@Id
	private Long id;
	
	@Version
	@Column(name = "version")
	private Integer version;
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy="school")
	private Set<Student> studentList;
	
	private String schoolName;
	
	public Long getId() {
		return id;
	} 

	public void setId(Long id) {
		this.id = id;
	}



	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Set<Student> getStudentList() {
		return studentList;
	}

	public void setStudentList(Set<Student> studentList) {
		this.studentList = studentList;
	}

	public String getSchoolName() {
		return schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}





}
